﻿using System.IO;
using System.Text;
using System.Xml.Serialization;

namespace Services.Helpers {

    public static class Utils {

        public static T Deserialize<T>(string xml) {
            var serializer = new XmlSerializer(typeof(T));
            var result = (T)serializer.Deserialize(new MemoryStream(Encoding.UTF8.GetBytes(xml)));
            return result;
        }

    }

}
